﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Process.Domain.Entities
{
    /// <summary>
    /// 生产工单实体
    /// </summary>
    [SugarTable("TicketModel")]
    public class TicketModel : BaseEntity
    {
        /// <summary>
        /// 工单编号
        /// </summary>
        [SugarColumn(ColumnName = "TicketCode")]
        public string TicketCode { get; set; }

        /// <summary>
        /// 工单名称
        /// </summary>
        [SugarColumn(ColumnName = "TicketName")]
        public string TicketName { get; set; }

        /// <summary>
        /// 工单来源类型
        /// </summary>
        [SugarColumn(ColumnName = "TicketFromType")]
        public string TicketFromType { get; set; }

        /// <summary>
        /// 订单编号
        /// </summary>
        [SugarColumn(ColumnName = "OrderCode")]
        public string OrderCode { get; set; }

        /// <summary>
        /// 工单类型
        /// </summary>
        [SugarColumn(ColumnName = "TicketType")]
        public string TicketType { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        [SugarColumn(ColumnName = "ProductCode")]
        public string ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [SugarColumn(ColumnName = "ProductName")]
        public string ProductName { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        [SugarColumn(ColumnName = "Specs")]
        public string Specs { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        [SugarColumn(ColumnName = "Unit")]
        public string Unit { get; set; }

        /// <summary>
        /// 工单数量（总数量）
        /// </summary>
        [SugarColumn(ColumnName = "TicketNumber")]
        public int TicketNumber { get; set; }

        /// <summary>
        /// 已经生产数量
        /// </summary>
        [SugarColumn(ColumnName = "HasNumber")]
        public int HasNumber { get; set; }

        /// <summary>
        /// 需求时间（结束时间）
        /// </summary>
        [SugarColumn(ColumnName = "DemandDate")]
        public DateTime DemandDate { get; set; }

        /// <summary>
        /// 客户编码
        /// </summary>
        [SugarColumn(ColumnName = "UserCode")]
        public string UserCode { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        [SugarColumn(ColumnName = "UserName")]
        public string UserName { get; set; }

        /// <summary>
        /// 工单描述
        /// </summary>
        [SugarColumn(ColumnName = "Desc")]
        public string Desc { get; set; }

        /// <summary>
        /// 工艺id
        /// </summary>
        [SugarColumn(ColumnName = "OperationId")]
        public long OperationId { get; set; }

        /// <summary>
        /// 进度
        /// </summary>
        [SugarColumn(ColumnName = "Progress")]
        public string Progress { get; set; }
    }
}
